﻿using System.Web.Mvc;

namespace Wekit.Areas.Website
{
    public class WebsiteAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Website";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                 "Website_NoAction",
                 "website/{controller}.aspx",
                 new { controller = "Home", action = "Index", id = "" });//无Action的匹配
            context.MapRoute(
                "Website_NoID",
                "website/{controller}/{action}.aspx",
                new { controller = "Home", action = "Index", id = "" });//无ID的匹配
            context.MapRoute(
                "Website_Default",
                "website/{controller}/{action}/{id}.aspx",
                 new { controller = "Home", action = "Index", id = "" });//默认匹配
            context.MapRoute(
                "Website_Root",
                 "website",
                 new { controller = "Home", action = "Index", id = "" });//根目录匹配
        }
    }
}
